<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人信息</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
    <script>
        function jumptoInfPage(id){
            window.location.href="${pageContext.request.contextPath}/UserServlet?action=BackToUserInf&id="+id;
        }
    </script>
</head>
<body>
<div class="container">
    <center><h3>个人信息</h3></center>
    <img class="img-circle" src="${pageContext.request.contextPath}/img/${user.header}" width="300" height="300">
    <form action="${pageContext.request.contextPath}/UserServlet?action=SubmitChangeInf" method="post">
        <div class="form-group">
            <input type="hidden" class="form-control" value="${user.id}" name="id">
        </div>

        <input type="file" name="header">

        <div class="form-group">
            <input type="hidden" class="form-control" value="${user.header}" name="oldheader">
        </div>
        <div class="form-group">
            <label for="username_">用户名:</label>
            <input type="text" class="form-control" value="${user.username}" id="username_" name="username"  >
        </div>

        <div class="form-group">
            <label for="tel_">电话号码:</label>
            <input type="text" class="form-control" value="${user.tel}" id="tel_" name="tel" >
        </div>

        <div class="form-group">
            <label for="address_">地址:</label>
            <input type="text" class="form-control" value="${user.address}" id="address_" name="address" >
        </div>

        <div class="form-group" style="text-align: center">
            <input class="btn btn-primary" type="submit" value="提交" />
            <input class="btn btn-default" type="button" value="返回" onclick="jumptoInfPage(${user.id})" />
        </div>
    </form>
</div>

</body>
</html>
</body>
</html>
